import Mock from 'mockjs'

const list = Mock.mock({
  'list|10': [{
    taskRuleId: '@id',
    respondSeconds: '@integer(0, 5000)',
    workDistance: '@csentence(5, 10)',
    workManualType: '@csentence(5)',
    introduction: '@csentence(50)',
    exchangeNote: '@csentence(50)',
    'fileFormat|1': ['.mp4', '.xsl'],
    'isRelease|1': [2, 1],
    'status|1': [2, 1],
    acceptTime: '@datetime',
    orderCost: '@integer(0, 5000)',
    'appId': '@id',
    'appName': '@csentence(5, 10)',
    'disRate|1-999': 2,
    'maxCost|1-999': 22,
    'noticeDay|1-22': 1,
    'overSureDay|1-22': 1,
    'serviceRate|1-100': 1
  }]
})
const pub = {
  isMore: 0,
  pageIndex: 1,
  pageSize: 10,
  startIndex: 0,
  totalNum: 30,
  totalPage: 1
}
const dictMap = {

}
export default [
  {
    url: '/task/taskRule/modifyTaskRule',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {},
        msg: ''
      }
    }
  },
  {
    url: '/task/taskRule/listTaskRule',
    type: 'get',
    response: config => {
      return {
        code: 1,
        data: {},
        msg: ''
      }
    }
  },
  {
    url: '/task/taskRule/getTaskRuleById',
    type: 'get',
    response: config => {
      return {
        code: 1,
        data: {
          ...list.list[0]
        },
        msg: ''
      }
    }
  },
  {
    url: '/task/taskRule/getTaskRuleByAppId',
    type: 'get',
    response: config => {
      return {
        code: 1,
        data: {
          ...list.list[0]
        },
        msg: ''
      }
    }
  },
  {
    url: '/task/taskRule/deleteTaskRuleById',
    type: 'get',
    response: config => {
      return {
        code: 1,
        data: {},
        msg: ''
      }
    }
  },
  {
    url: '/task/taskRule/batchModifyTaskRule',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {},
        msg: ''
      }
    }
  },
  {
    url: '/task/taskRule/addTaskRule',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {},
        msg: ''
      }
    }
  },
  // 订单设置列表
  {
    url: '/task/taskRule/listTaskRule',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {
          ...list,
          ...pub
        },
        dictMap,
        msg: ''
      }
    }
  },
  // 删除作业指导书
  {
    url: '/task/WorkManual/deleteWorkManualByIds',
    type: 'get',
    response: config => {
      return {
        code: 1,
        data: {},
        msg: ''
      }
    }
  }
]
